<extend name="Public/base" />
<block name="content">
<!-- 配置文件 -->
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.config.all.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.all.min.js"></script>
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/css/webuploader.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/css/style.css" />
<style>
#header{margin-top:0px;}
</style>
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a class="tip-bottom" href="{:U('Index/index')}" data-original-title="首页"><i class="icon-home"></i> 首页</a>
			<a class="tip-bottom" href="{:U('Article/article')}" data-original-title="">文章管理</a> 
			<a class="tip-bottom" href="{:U('Article/keyWordLink')}" data-original-title="">关键字管理</a> 
			<a class="current">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-align-justify"></i></span>
						<h5>{$meta_title}</h5>
					</div>
					<div class="widget-content nopadding">
						<form class="form-horizontal" method="post" action="">
							<div class="control-group">
								<label class="control-label">名称:</label>
								<div class="controls">
									<input type="text" placeholder="请输入1-15个字符" class="ui-wizard-content span3" maxlength="15" name="ask_keyword_name" value="{$info.ask_keyword_name|htmlspecialchars}" >
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">链接:</label>
								<div class="controls">
									<input type="text" placeholder="请输入URL,例：http://www.baidu.com" class="ui-wizard-content span3" maxlength="100" name="ask_keyword_link" value="{$info.ask_keyword_link|htmlspecialchars}" >
								</div>
							</div>
							<div class="form-actions">
								<button class="btn btn-success" type="submit">提交</button>
							</div>
							<input type="hidden" name="ad_id" value="{$info.ask_keyword_id}"/>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


<script type="text/javascript">
$(document).ready(function(){
	//初始化登录用户名输入焦点
	tke_form_focus();
	$("form").submit(function(){
		//锁定登录按钮
		$('button').attr('disabled',true);
		var self = $(this);
		$.post("{$post_url}", self.serialize(), call_back, "json");
		return false;
		
		/**
		 * @todo 接收登录返回值
		 * @author PHP@妖孽 <dino_ma@163.com>
		 */
		function call_back(data){
			if(data.status==1){
				tke_alert(data.info,'alert-success');
				setTimeout(function(){
					window.location.href = data.url;
				},1500);
			} else {
				$('button').attr('disabled',false);
				tke_alert(data.info,'alert-error');
			}
		}
	});
	//导航高亮
	highlight_subnav("{:U('Article/keyWordLink')}");
});
</script>
</block>